package com.itwn.comic.mapper;

import com.itwn.comic.entity.Section;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SectionMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Section record);

    Section selectByPrimaryKey(Integer id);

    List<Section> selectAll();

    int updateByPrimaryKey(Section record);
    @Select("select * from t_section where resource_id = #{value} ORDER BY update_time desc")
    List<Section> selectAllByTime(Integer id);

    List<Section> selectByResourceId(Integer id);

}